import javax.print.DocFlavor;

public class people {
    public void sleep1(String name,String place,String time){
        System.out.println(name+"在"+place+time+"睡觉");
    }

    public void sleep2(String[] infos){
        System.out.println(infos[0]+"在"+infos[1]+infos[2]+"睡觉");
    }



    public void sleep3(MyInfo info){
        System.out.println(info.name+"在"+info.place+info.time+"睡觉");
    }
    public static void main(String[] args) {
        people zs = new people() ;
//        zs.sleep1("张三","家里","21:00");
//        String[] infos = {"张三","家里","21:00"};
//        zs.sleep2(infos);
            MyInfo info = new MyInfo();
           info.name="zs";
           info.place="宾馆";
           info.time=22;
            zs.sleep3(info);

       people ls = new people();
//        ls.sleep1("李四","酒店","22:00");
        String[] lsInfos={"李四","酒店","22:00"};
        ls.sleep2(lsInfos);
    }
}
